﻿using System;
using CRM.Models.Email;

namespace CRM.ViewModels.Email
{
    public class EmailVerifyVM
    {
        private readonly MyDbContext _dbContext;

        public EmailVerifyVM(MyDbContext dbContext)
        {
            _dbContext = dbContext;
        }
        public int Id { get; set; }
        public int UserId { get; set; }
        public int OemId { get; set; }
        public int CompanyId { get; set; }
        public string EmailAddress { get; set; }
        public int State { get; set; }
        public bool RecentlyUpdatedWay { get; set; } = false;
        public EmailVerify NewModel(MyDbContext dbContext,Models.User user)
        {
            return new() {
                OemId = user.OemId,
                CompanyId = user.CompanyId,
                GroupId = user.GroupId,
                UserId = user.Id,
                EmailAddress = EmailAddress,
                State = Convert.ToBoolean(State),
                // RecentlyUpdatedWay = RecentlyUpdatedWay
            };
        }
    }
}